#ifndef __TRENDDB_H_
#define __TRENDDB_H_

#include <cogent.h>
#include "ablibs.h"

/*typedef struct pt_s {
	double t;
	double y;
} pt_t;*/

extern IP_Task *myself;
extern IP_Task *hist;

int trenddb_init_ip (char *trenddb_name, IP_Task **myself, IP_Task **hist);
int trenddb_destroy_ip (IP_Task **myself, IP_Task **hist);
int trenddb_flush (IP_Task *myself, IP_Task *hist);
int trenddb_start_new_file (IP_Task *myself, IP_Task *hist);
int interpolate_data (IP_Task *myself, IP_Task *hist,
					  char *hist_name, double t_beg, double t_end,
					  pt_t **values, int *nvalues);
	
#endif // __TRENDDB_h_